# _*_ encoding: utf-8 _*_
# __author__ = 'lx'

import os
import numpy as np
import six
from paddle import fluid
import distutils.util
from stargan_v2.config import get_arguments

def print_arguments(args):
    ''' Print argparse's argument
    Usage:

    .. code-block:: python

        parser = argparse.ArgumentParser()
        parser.add_argument("name", default="Jonh", type=str, help="User name.")
        args = parser.parse_args()
        print_arguments(args)

    :param args: Input argparse.Namespace for printing.
    :type args: argparse.Namespace
    '''
    print("-----------  Configuration Arguments -----------")
    for arg, value in sorted(six.iteritems(vars(args))):
        print("%s: %s" % (arg, value))
    print("------------------------------------------------")

def subdirs(dname):
    # 目录下的目录列表
    return [d for d in os.listdir(dname)
            if os.path.isdir(os.path.join(dname, d))]

def main(args):
    # 此处设置固定的随机数种子
    np.random.seed(0)
    # 编写动作
    if args.mode == 'train':
        assert len(subdirs(args.train_img_dir)) == args.num_domains
        assert len(subdirs(args.val_img_dir)) == args.num_domains
        # 数据加载


parser = get_arguments()
args = parser.parse_args()
print_arguments(args)
main(args)